Designers of database management systems often employ snapshot isolation techniques to ensure that users are able to read consistent data while data is modified by concurrent transactions. For each data record, snapshot isolation systems track commit timestamps of inserted and deleted transactions. These transaction commit timestamp values along with snapshot timestamps are used to return consistent data to clients. Snapshot isolation aids in preventing the scenario where someone is reading from a database at the same time as someone else is writing to it, causing the reader to see a half-written or inconsistent piece of data.
Snapshot isolation techniques are often implemented by maintaining multiple versions of data records. One such technique is multi-version concurrency control (MVCC). Under MVCC, a new version of a database object is generated each time the object is written. When a client reads the object, the database management system may return the last relevant versions of the object. MVCC generally keeps multiple copies of each data item. Users connected to the database then see a snapshot of the database at a particular instant in time. Changes made by a writer may not be seen by other users of the database until the changes have been completed (i.e., until the transaction has been committed). MVCC uses timestamps to organize these transactions. Often, MVCC correlates the data of the database to a first timestamp block related to insertions and a second timestamp block related to deletions (if the data record is deleted) based on row number. This correlation, however, may result in inefficient memory allocation based on the process for tracking insertions and deletions. Further, inefficient memory allocation may occur especially with delete commit timestamps due to their ad-hoc nature.
In the drawings, like reference numbers generally indicate identical or similar elements. Additionally, generally, the left-most digit(s) of a reference number identifies the drawing in which the reference number first appears.